/**
 * Created by shirenchuang on 2017/3/16.
 */

import com.dubbo.service1.Test1Service1;
import com.dubbo.service3.Test1Service3;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Consumer2 {

    public static void main(String[] args) throws Exception {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]
                {"consumer.xml"});
        context.start();

        Test1Service3 test1Service3 = (Test1Service3)context.getBean("test1Service3"); // 获取远程服务代理
        String s  = test1Service3.test1Service3_1(); // 执行远程方法

        System.out.print("end......."+s);
    }

}